import Express from "express";
import {} from "./homeApi.js";
import {
  add,
  select,
  lose,
  put,
  selectCountInfo,
  putCount,
  scanLogin,
  findBackPwd,
  newLoginTime,
} from "./regeisterAndlogin.js";
import {
  selectNovel,
  selectNovelChapterList,
  selectNovelDetailInfo,
  selectChapterContent,
  selectFourNovel,
  selectTxtNovel,
  downTxtNovel,
  getClassList,
  app_getRecommandNovels,
  app_getPopularityrank,
  app_getTopscore,
  app_getPraiserank,
  app_getFinishrank,
  app_getBookgardensquare,
  app_getClassifys,
  app_getSearchhistory,
  app_getSearchNovelName,
  app_getSearchFindNovels,
  app_getNovelCatalogue,
  app_getNovelChapterContent,
  app_getNovelComment,
} from "./selectNovel.js";
import {
  loseUserTask,
  addUserTask,
  putUserTaskDownloadTime,
  putUserTaskisSuccess,
  queryUserTask,
} from "./downtask.js";
import { addMeun, loseMeun, putMeun, getMeun } from "./webApi/meun.js";
import { addDict, loseDict, putDict, getDict } from "./webApi/dict.js";
import { webAddUser,webLoseUser,webQueryUser } from "./webApi/webUse.js";
import { file, checkNewApp, logFile } from "./files.js";
import { getAboutList } from "./about.js";
import { createCode } from "./randomCode.js";
const useRouter = Express.Router();
useRouter.post("/queryUserTask", queryUserTask);
useRouter.post("/loseUserTask", loseUserTask);
useRouter.post("/addUserTask", addUserTask);
useRouter.post("/putUserTaskDownloadTime", putUserTaskDownloadTime);
useRouter.post("/putUserTaskisSuccess", putUserTaskisSuccess);
useRouter.post("/api/sendCode", createCode);
useRouter.post("/api/regeister", add);
useRouter.post("/api/login", select);
useRouter.post("/findBackPwd", findBackPwd);
useRouter.get("/getCountInfo", selectCountInfo);
useRouter.post("/lose/loseUser", lose);
useRouter.post("/put/putUserInfo", put);
useRouter.post("/put/putCount", putCount);
useRouter.get("/selectNovel", selectNovel);
useRouter.get("/getNovelDetailInfo", selectNovelDetailInfo);
useRouter.get("/getChapterContent", selectChapterContent);
useRouter.get("/getNovelList", selectNovelChapterList);
useRouter.get("/getFourNovel", selectFourNovel);
useRouter.get("/getAboutList", getAboutList);
useRouter.get("/getClassList", getClassList);
useRouter.post("/app/file", file);
useRouter.post("/app/checkApp", checkNewApp);
useRouter.post("/log/logFile", logFile);
useRouter.post("/api/scanLogin", scanLogin);
useRouter.post("/selectTxtNovel", selectTxtNovel);
useRouter.post("/downTxtNovel", downTxtNovel);
useRouter.post("/newLoginTime", newLoginTime);
//app
useRouter.get("/app/app_getRecommandNovels", app_getRecommandNovels);
useRouter.get("/app/app_getFinishrank", app_getFinishrank);
useRouter.get("/app/app_getPraiserank", app_getPraiserank);
useRouter.get("/app/app_getTopscore", app_getTopscore);
useRouter.get("/app/app_getPopularityrank", app_getPopularityrank);
useRouter.get("/app/app_getBookgardensquare", app_getBookgardensquare);
useRouter.get("/app/app_getClassifys", app_getClassifys);
useRouter.get("/app/app_getSearchhistory", app_getSearchhistory);
useRouter.get("/app/app_getSearchNovelName", app_getSearchNovelName);
useRouter.get("/app/app_getSearchFindNovels", app_getSearchFindNovels);
useRouter.get("/app/app_getNovelCatalogue", app_getNovelCatalogue);
useRouter.get("/app/app_getNovelChapterContent", app_getNovelChapterContent);
useRouter.get("/app/app_getNovelComment", app_getNovelComment);
//webApi
//meun.js
useRouter.post("/web/addMeun", addMeun);
useRouter.get("/web/loseMeun", loseMeun);
useRouter.post("/web/putMeun", putMeun);
useRouter.get("/web/getMeun", getMeun);
useRouter.post("/web/webAddUser",webAddUser)
useRouter.post("/web/webLoseUser",webLoseUser)
useRouter.post("/web/webQueryUser",webQueryUser)
//dict.js
useRouter.post("/web/addDict", addDict);
useRouter.get("/web/loseDict", loseDict);
useRouter.post("/web/putDict", putDict);
useRouter.get("/web/getDict", getDict);
export default useRouter;
